package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchBatchOperationMapper;
import com.ruoyi.system.domain.DispatchBatchOperation;
import com.ruoyi.system.service.IDispatchBatchOperationService;

/**
 * 批量操作Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchBatchOperationServiceImpl implements IDispatchBatchOperationService 
{
    @Autowired
    private DispatchBatchOperationMapper dispatchBatchOperationMapper;

    /**
     * 查询批量操作
     * 
     * @param operatorId 批量操作主键
     * @return 批量操作
     */
    @Override
    public DispatchBatchOperation selectDispatchBatchOperationByOperatorId(Long operatorId)
    {
        return dispatchBatchOperationMapper.selectDispatchBatchOperationByOperatorId(operatorId);
    }

    /**
     * 查询批量操作列表
     * 
     * @param dispatchBatchOperation 批量操作
     * @return 批量操作
     */
    @Override
    public List<DispatchBatchOperation> selectDispatchBatchOperationList(DispatchBatchOperation dispatchBatchOperation)
    {
        return dispatchBatchOperationMapper.selectDispatchBatchOperationList(dispatchBatchOperation);
    }

    /**
     * 新增批量操作
     * 
     * @param dispatchBatchOperation 批量操作
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchBatchOperation(DispatchBatchOperation dispatchBatchOperation)
    {
        return dispatchBatchOperationMapper.insertDispatchBatchOperation(dispatchBatchOperation);
    }

    /**
     * 修改批量操作
     * 
     * @param dispatchBatchOperation 批量操作
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchBatchOperation(DispatchBatchOperation dispatchBatchOperation)
    {
        return dispatchBatchOperationMapper.updateDispatchBatchOperation(dispatchBatchOperation);
    }

    /**
     * 批量删除批量操作
     * 
     * @param operatorIds 需要删除的批量操作主键
     * @return 结果
     */
    @Override
    public int deleteDispatchBatchOperationByOperatorIds(Long[] operatorIds)
    {
        return dispatchBatchOperationMapper.deleteDispatchBatchOperationByOperatorIds(operatorIds);
    }

    /**
     * 删除批量操作信息
     * 
     * @param operatorId 批量操作主键
     * @return 结果
     */
    @Override
    public int deleteDispatchBatchOperationByOperatorId(Long operatorId)
    {
        return dispatchBatchOperationMapper.deleteDispatchBatchOperationByOperatorId(operatorId);
    }
}
